<template>
  <el-breadcrumb class="breadcrumb"
    ><el-breadcrumb-item v-for="item in breadcrumb" :key="item.name">
      <span v-if="item.path == undefined" class="name">{{ item.name }}</span>
      <router-link v-else :to="item.path" class="link">{{
        item.name
      }}</router-link>
    </el-breadcrumb-item>
    <!-- <template v-for="item in breadcrumb"></template> -->
    <!-- <el-breadcrumb-item :to="{ path: '/' }">应用设计器</el-breadcrumb-item>
    <el-breadcrumb-item :to="{ path: '/' }">应用名称</el-breadcrumb-item>
    <el-breadcrumb-item :to="{ path: '/modular' }">模块管理</el-breadcrumb-item>
    <el-breadcrumb-item>表单管理</el-breadcrumb-item> -->
  </el-breadcrumb>
</template>
<script>
export default {
  data() {
    return {
      breadcrumb: [],
    };
  },
  mounted() {
    setTimeout(() => {
      this.breadcrumb = JSON.parse(sessionStorage.getItem("breadcrumbStorage"));
    }, 100);
  },
};
</script>
<style lang="scss" scoped>
.router-link-active {
  height: 22px;
  color: rgba(102, 102, 102, 1);
  font-size: 12px;
  line-height: 22px;
}
.link{

  height: 22px;
  color: rgba(102, 102, 102, 1);
  font-size: 12px;
  line-height: 22px;
}
.name {
  color: rgba(179, 179, 179, 1);
  font-size: 12px;
  line-height: 22px;
}
</style>